package com.xingkeduo.dto.transter.hairstyleDetails;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.xingkeduo.dto.HairstyleResponseDTO;
import com.xingkeduo.dto.HairstyleTableDTO;
import lombok.Data;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;

import java.util.List;

@Data
public class SuggestList {


    private String f_id;
    private String f_pic;
    private String f_name;
    private String f_hairsytle_label;
    private String f_english_sign;


    public void cover(HairstyleTableDTO hairstyleTableDTO){

        this.f_id = String.valueOf(hairstyleTableDTO.getId());
        this.f_pic = hairstyleTableDTO.getCover();
        this.f_name = hairstyleTableDTO.getName();
//        String tagIds = hairstyleTableDTO.getStyleTagids();
//        this.f_hairsytle_label =  tagIds;
//        if(StringUtils.isNotBlank(tagIds)){
//            List<String> stringList = JSONObject.parseArray(tagIds, String.class);
//            if(stringList!=null && stringList.size()>0){
//                this.f_hairsytle_label  = stringList.get(0);
//            }
//
//        }
        this.f_hairsytle_label = hairstyleTableDTO.getTitle();
        this.f_english_sign = hairstyleTableDTO.getEnmark();
    }




}
